<template>
	<view class="page-view flex flex-direction">
		<view class="top-wrap">
			<image class="bg" src="/static/newstitle.png" mode="widthFix"></image>
			<cu-custom :isFixed="true" ref="cuCustom" :isBack="true" bgImage="noImage">
				<template slot="backText">
					返回
				</template>
			</cu-custom>
			<view class="title-name flex align-center justify-center">
				<text>{{ schoolInfo.schoolName }}{{ schoolInfo.majorCode }}项目调剂详情</text>
			</view>
		</view>
		<view class="flex-sub main">
			<view class="info">
				<rich-text :nodes="schoolInfo.dispensingDetail" v-if="schoolInfo.dispensingDetail"></rich-text>
				<view v-else>暂未配置调剂信息</view>
			</view>
			<contact></contact>
		</view>
	</view>
</template>

<script>
import contact from '@/components/contact.vue';

export default {
	data() {
		return {
			id: 0,
			schoolInfo: null
		};
	},
	components: { contact },
	onLoad(options) {
		console.log(options);
		this.id = options.id;
		this.getSchoolInfo();
	},
	methods: {
		getSchoolInfo() {
			this.$getajax(this.$api.getSchoolInfo, {
				id: this.id
			}).then(da => {
				if (da.code == 200) {
					this.schoolInfo = da.data;
				}
			});
		}
	}
};
</script>

<style scoped lang="less">
.page-view {
	height: 100vh;
}
.bg {
	display: block;
	width: 100%;
}
.top-wrap {
	position: relative;
	.title-name {
		position: absolute;
		height: 130upx;
		line-height: 1.2;
		bottom: 0;
		text-align: center;
		left: 0;
		right: 0;
		color: #fff;
		font-weight: bold;
		font-size: 46upx;
		text {
			background-image: -webkit-linear-gradient(top, #fff, #f4b573);
			-webkit-background-clip: text;
			color: transparent;
		}
	}
}
.main {
	height: 0;
	overflow: auto;
}
.info {
	background: #fff;
	font-size: 21upx;
	color: #717171;
	line-height: 29upx;
	padding: 30upx 50upx;
	box-shadow: 0 0 10upx rgba(0, 0, 0, 0.2);
	margin-top: 15upx;
}
.btnlist {
	margin: 10upx 24upx;
	.btn {
		width: 356upx;
		image {
			display: block;
			width: 100%;
		}
	}
}
</style>
